package com.ourteam.system.dao;

/**
 * Template Name : DAO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Aug 18 15:51:23 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:21
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.lang.StringUtils;


public class SysUserPassword implements java.io.Serializable {
    private String userName;

    /**
     * Attribute userName Be Seted Falg
     */
    private boolean userNameSetted = false;

    /**
    * Attribute userName is Null Falg
    */
    private boolean userNameNull = false;
    private String enabled;

    /**
     * Attribute enabled Be Seted Falg
     */
    private boolean enabledSetted = false;

    /**
    * Attribute enabled is Null Falg
    */
    private boolean enabledNull = false;
    private String password;

    /**
     * Attribute password Be Seted Falg
     */
    private boolean passwordSetted = false;

    /**
    * Attribute password is Null Falg
    */
    private boolean passwordNull = false;

    public SysUserPassword() {
        super();
    }

    /**
         * Get userName
         *
         * @return String
         */
    final public String getUserName() {
        if (isUserNameNull()) {
            return null;
        } else {
            return StringUtils.trim(userName);
        }
    }

    /**
     * Set userName
     *
     * @param String
     */
    final public void setUserName(String userName) {
        this.userName = StringUtils.trim(userName);

        this.userNameSetted = true;

        this.setUserNameNull(this.userName == null);
    }

    /**
     * Get userName Has Been Setted
     *
     * @return boolean
     */
    final public boolean isUserNameSetted() {
        return this.userNameSetted;
    }

    /**
     * Set userName Null
     *
     */
    final public void setUserNameNull() {
        this.userNameNull = true;
    }

    final public void setUserNameNull(boolean aNullFlag) {
        this.userNameNull = aNullFlag;
    }

    final public boolean isUserNameNull() {
        return this.userNameNull;
    }

    /**
         * Get enabled
         *
         * @return String
         */
    final public String getEnabled() {
        if (isEnabledNull()) {
            return null;
        } else {
            return StringUtils.trim(enabled);
        }
    }

    /**
     * Set enabled
     *
     * @param String
     */
    final public void setEnabled(String enabled) {
        this.enabled = StringUtils.trim(enabled);

        this.enabledSetted = true;

        this.setEnabledNull(this.enabled == null);
    }

    /**
     * Get enabled Has Been Setted
     *
     * @return boolean
     */
    final public boolean isEnabledSetted() {
        return this.enabledSetted;
    }

    /**
     * Set enabled Null
     *
     */
    final public void setEnabledNull() {
        this.enabledNull = true;
    }

    final public void setEnabledNull(boolean aNullFlag) {
        this.enabledNull = aNullFlag;
    }

    final public boolean isEnabledNull() {
        return this.enabledNull;
    }

    /**
         * Get password
         *
         * @return String
         */
    final public String getPassword() {
        if (isPasswordNull()) {
            return null;
        } else {
            return StringUtils.trim(password);
        }
    }

    /**
     * Set password
     *
     * @param String
     */
    final public void setPassword(String password) {
        this.password = StringUtils.trim(password);

        this.passwordSetted = true;

        this.setPasswordNull(this.password == null);
    }

    /**
     * Get password Has Been Setted
     *
     * @return boolean
     */
    final public boolean isPasswordSetted() {
        return this.passwordSetted;
    }

    /**
     * Set password Null
     *
     */
    final public void setPasswordNull() {
        this.passwordNull = true;
    }

    final public void setPasswordNull(boolean aNullFlag) {
        this.passwordNull = aNullFlag;
    }

    final public boolean isPasswordNull() {
        return this.passwordNull;
    }

    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = (prime * result) +
            ((getUserName() == null) ? 0 : getUserName().hashCode());

        return result;
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if ((obj instanceof SysUserPassword) == false) {
            return false;
        }

        SysUserPassword other = (SysUserPassword) obj;

        if (getUserName() == null) {
            if (other.getUserName() != null) {
                return false;
            }
        } else if (getUserName().equals(other.getUserName()) == false) {
            return false;
        }

        return true;
    }

    public String toString() {
        StringBuffer buffer = new StringBuffer();

        buffer.append("[");

        buffer.append("userName=");
        buffer.append(this.userName);

        buffer.append("enabled=");
        buffer.append(this.enabled);

        buffer.append("password=");
        buffer.append(this.password);

        buffer.append("]");

        return buffer.toString();
    }
}
